<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../layui/jquery-3.2.1.min.js"></script>
    <script src="../../layui/layui.js"></script>
    <link href="../../layui/css/layui.css" rel="stylesheet"><link>
    <script src="customer.js"></script>
</head>
<body >
<div  >
    <div style="height: 35px">
        <div style="margin-left: 500px"><h1>客户管理</h1>
        </div>
        <div>
            <table class="layui-table">
                <thead>
                <tr><th>客户名称</th><th>负责人</th><th>经营范围</th><th>操作</th></tr>
                </thead>
                <tbody id="tbodyId"></tbody>
            </table>
            <!--分页插件-->
            <div id="cutPageDiv"></div>
            <div style="display: flex">
                <!--弹出层-->
                <div style="width: 325px">
                    <a class="layui-btn layui-btn-warm" href="javascript:add()" style="width: 100px">添加客户</a>
                </div>
                <form class="layui-form" id="formId" style="margin-left: 520px">
                        <div class="layui-form-item">
                            <label class="layui-form-label">客户名称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="name"placeholder="请输入客户名称" autocomplete="on" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">经营范围</label>
                            <div class="layui-input-inline">
                                <input type="text" name="scope"  placeholder="请输入经营范围" autocomplete="on" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <a class="layui-btn" lay-submit lay-filter="formDemo" onclick="findByItem(1)">查询</a>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                </form>
            </div>
            <div>
                <div  id="add" style="display: none;margin-top: 50px;margin-left: 50px">
                    <form class="layui-form" id="addFrom">
                        <div class="layui-form-item">
                            <label class="layui-form-label">客户名称</label>
                            <div class="layui-input-inline">
                                <input type="text" name="name" required  lay-verify="required" placeholder="请输入客户名称" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux" id="nameSpan">客户名称必需填写</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">负责人</label>
                            <div class="layui-input-inline">
                                <input type="text" name="headMan" required  lay-verify="required" placeholder="请输入负责人" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux" id="headManSpan">负责人必需填写</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">负责人电话</label>
                            <div class="layui-input-inline">
                                <input type="text" name="tel" required  lay-verify="required|phone" placeholder="请输入负责人电话" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux" id="telSpan">负责人电话必需填写</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">办公地址</label>
                            <div class="layui-input-inline">
                                <input type="text" name="address" required  lay-verify="required" placeholder="请输入办公地址" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux" id="addressSpan">办公地址必须填写</div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">邮箱地址</label>
                            <div class="layui-input-inline">
                                <input type="text" name="email" required  lay-verify="required" placeholder="请输入邮箱地址" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux" id="emailSpan">邮箱地址必需填写</div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">经营范围</label>
                            <div class="layui-input-block">
                                <textarea name="scope" placeholder="请输入内容" class="layui-textarea" ></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <a class="layui-btn" lay-submit lay-filter="formDemo" onclick="closeAdd()">立即提交</a>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div  id="update" style="display: none">
                    <form class="layui-form" id="updateFrom">
                        <div class="layui-form-item">
                            <label class="layui-form-label">客户名称：</label>
                            <div class="layui-form-mid layui-word-aux" id="nameinput"></div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">负责人：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="headMan" required lay-verify="required"autocomplete="off" class="layui-input" id="headMan" >
                            </div>
                            <div class="layui-form-mid layui-word-aux" id="headManinput"></div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">电话：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="tel" required lay-verify="required" autocomplete="off" class="layui-input" id="tel">
                            </div>
                            <div class="layui-form-mid layui-word-aux" id="telinput"></div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">办公地址：</label>
                            <div class="layui-form-mid layui-word-aux" id="addressinput"></div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">邮箱地址：</label>
                            <div class="layui-form-mid layui-word-aux" id="emailinput"></div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">经营范围：</label>
                            <div class="layui-input-block">
                                <textarea name="scope" placeholder="请输入内容" class="layui-textarea" id="scopeinput"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <a class="layui-btn" lay-submit lay-filter="formDemo" onclick="closeUpdate()">确定</a>
                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div  id="find" style="display: none">
                    <form class="layui-form" id="findBy">
                        <div class="layui-form-item">
                            <label class="layui-form-label">客户名称：</label>
                            <div class="layui-form-mid layui-word-aux" id="namefind"></div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">负责人：</label>
                            <div class="layui-form-mid layui-word-aux" id="headManfind"></div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">电话：</label>
                            <div class="layui-form-mid layui-word-aux" id="telfind"></div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">办公地址：</label>
                            <div class="layui-form-mid layui-word-aux" id="addressfind"></div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">邮箱地址：</label>
                            <div class="layui-form-mid layui-word-aux" id="emailfind"></div>
                        </div>
                        <div class="layui-form-item layui-form-text">
                            <label class="layui-form-label">经营范围：</label>
                            <div class="layui-form-mid layui-word-aux" id="scopefind"></div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <a class="layui-btn" lay-submit lay-filter="formDemo" onclick="closefind()">确定</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>